package com.weather.data.entity.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 天擎-接口参数信息
 * </p>
 *
 * @author baomidou
 * @since 2024-12-24
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("weather_sky_parameter")
@Schema(name = "SkyParameter", description = "天擎-接口参数信息")
public class SkyParameter extends Model<SkyParameter> {

    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "参数id")
    @TableField("parameter_id")
    private String parameterId;

    @Schema(description = "参数名称")
    @TableField("parameter_name")
    private String parameterName;

    @Schema(description = "参数类型(0:可选，1:必选)")
    @TableField("parameter_type")
    private Boolean parameterType;

    @Schema(description = "weather_sky_engine表id相关联")
    @TableField("sky_id")
    private Long skyId;

    @Schema(description = "参数说明/示例")
    @TableField("parameter_explain")
    private String parameterExplain;

    @Schema(description = "用户输入的值")
    @TableField(exist = false)
    private String value;


    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
